package com.flame.auth.client.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.convert.DurationUnit;

import javax.annotation.PostConstruct;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;

/**
 * @author wuxintong
 * @since 2022/12/14
 */
@ConfigurationProperties("flame.auth.client")
public class AuthClientConfigurationProperties {

    private Duration tokenTimeout = Duration.ofMinutes(30);

    private Duration tokenRefresh = Duration.ofMinutes(10);

    public Duration getTokenTimeout() {
        return tokenTimeout;
    }

    public void setTokenTimeout(Duration tokenTimeout) {
        this.tokenTimeout = tokenTimeout;
    }

    public Duration getTokenRefresh() {
        return tokenRefresh;
    }

    public void setTokenRefresh(Duration tokenRefresh) {
        this.tokenRefresh = tokenRefresh;
    }
}
